/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tourmsystem.bookingmn.controller;
import tourmsystem.bookingmn.model.Customer;
import tourmsystem.bookingmn.view.DattourView;
import tourmsystem.bookingmn.view.ViewHienthithongtin;
import tourmsystem.bookingmn.view.ViewSignUp;
import tourmsystem.bookingmn.view.bangtkTour;
import tourmsystem.tourmanaging.classes.Tour;
/**
 *
 * @author Thanh Nga
 */
public class BookingController {
    private DattourView dattourview;
    private ViewSignUp dkthongtin;
    private ViewHienthithongtin httt;
    private bangtkTour btour;
    private Customer cus;
    private Tour tour;
    private SqlConnect sql;
    public BookingController(){
        sql = new SqlConnect();
        sql.connect();   
       dattourview = new DattourView(new MyHandler() {

            @Override
            public void action(String s) {
                if(("timkiemtour").equals(s)){
                    dattourview.setVisible(false);
                    btour= new bangtkTour(new MyHandler() {

                        @Override
                        public void action(String s) {
                            if(("timXuan").equals(s)){
                                btour.setVisible(false);
                                
                                tour = sql.tim("xuan");
                                System.out.println(tour.getId() + tour.getName() + tour.getStartDate()+ tour.getDuration()+ tour.getType()+ tour.getSchedule()+ tour.getPrice());
                            }
                        }
                    });
                    btour.show();
                }
                if(("dskh").equals(s)){
                    dattourview.setVisible(false);
                    
                    
                }
                if(("back").equals(s)){
                    System.exit(1);
                }
               
            }
        });
       dattourview.show();
     }
 }
